#editsToR.py
#
#

import os
import sys

def main():

	path = sys.argv[1]
	files = os.listdir(path)

	for nsfile in files:
		f = open(path+nsfile, "r")
		numList = []
		for line in f:
			pieces = line.split(' ')
			if pieces[0] <> "TOTAL" and pieces[0] <> "Stats":
				numList.append(pieces[1].replace('\n',''))
		printable(numList,nsfile)

def printable(aList,fileName):
	if "2012" not in fileName:
		print fileName.replace(".txt", "").replace(' ','') + " <- c(" + ",".join(aList) + ')'

main()
